//
// Created by chengs1r on 2021/11/9.
//

#include <stdio.h>

int recursion_fib (int num) {
    if (num <= 2) {
        return 1;
    }
    return recursion_fib(num - 1) + recursion_fib(num - 2);
}

int iteration_fib (int num) {
    int res = 1;

    int prev = 1;
    int next = 1;
    while (num >= 3) {
        res = prev + next;
        prev = next;
        next = res;

        num--;
    }

    return res;
}

int main () {
    int num = 0;
    scanf("%d", &num);
    printf("recursion_fib(%d): %d\n", num, recursion_fib(num));
    printf("iteration_fib(%d): %d\n", num, iteration_fib(num));



    return 0;
}